package org.jeecg.modules.business.takestockplan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.business.takestockplan.entity.TakeStockPlanDifference;
import org.jeecg.modules.business.takestockplan.entity.TakeStockPlanDifferenceMaterial;
import org.jeecg.modules.business.takestockplan.entity.VO.TakeStockPlanExecuteVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 盘点差异处理单
 * @Author: jeecg-boot
 * @Date:   2023-11-23
 * @Version: V1.0
 */
public interface ITakeStockPlanDifferenceService extends IService<TakeStockPlanDifference> {

	/**
	 * 添加一对多
	 *
	 * @param takeStockPlanDifference
	 * @param wmsTakeStockPlanDifferenceMaterialList
	 */
	public void saveMain(TakeStockPlanDifference takeStockPlanDifference,List<TakeStockPlanDifferenceMaterial> wmsTakeStockPlanDifferenceMaterialList) ;
	
	/**
	 * 修改一对多
	 *
   * @param takeStockPlanDifference
   * @param wmsTakeStockPlanDifferenceMaterialList
	 */
	public void updateMain(TakeStockPlanDifference takeStockPlanDifference,List<TakeStockPlanDifferenceMaterial> wmsTakeStockPlanDifferenceMaterialList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 分页
	 * @param page
	 * @param takeStockPlanDifference
	 * @return
	 */
	Page<TakeStockPlanExecuteVO> listByPage(Page<TakeStockPlanExecuteVO> page, TakeStockPlanExecuteVO takeStockPlanDifference);

	/**
	 * 生成盘盈盘亏单
	 * @param id
	 */
	void addTakeStockResult(String id);

	/**
	 * 导入物料明细
	 * @return
	 */
	Result<List<TakeStockPlanDifferenceMaterial>> importExcel(MultipartFile file, String takeStockPlanId, String takeStockPlanDifferenceId);
}
